<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 addon_domains_manage.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.1
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
include $root_path.'common.php';
$page_title = $lang['addon_domains'];
include $root_path.'page_header.php';

$current_domains_with_junk = <<<EOFpacman
<cpanel Park="cplistaddons()">
EOFpacman;

$array_of_domains_with_junk = array();
$array_of_domains = explode('<br>', $current_domains_with_junk);


$i = 0;
foreach ($array_of_domains as $row) {

	// Get the domain name and subdomain name with a little parsage.
	$temp = explode('(', $row);
	$domain = trim($temp[0]);
	$temp2 = explode(')', $temp[1]);
	$subdomain_name = $temp2[0];
	
	if (trim($row) != '') {
		$template->assign_block_vars('current_domains_row', array(
			'ROWCLASS' => ($i%2) ? $template_cfg['class_row_1'] : $template_cfg['class_row_2'],
			'DOMAIN' => $row,
			'DOMAIN_NAME' => $domain,
			'SUBDOMAIN_NAME' => $subdomain_name,
			'U_DELETE' => 'addon_domains_delete_done.php?domain='.$domain.','.$subdomain_name.'.'.$domain,
			'U_SETUP_REDIRECT' => 'addon_domains_setup_redirect.php?domain='.$domain.','.$subdomain_name.'_'.$domain,
			'U_REMOVE_REDIRECT' => 'addon_domains_delete_redirect_done.php?domain='.$domain.','.$subdomain_name.'_'.$domain,
		));
	$i++;
	};
};

$template->assign_vars(array(
	'U_ADD_ACTION' => "addon_domains_add_done.php",
	
	'L_ADDON_DOMAINS' => $lang['addon_domains'],
	'L_ADDON_DOMAINS_DESCRIPTION' => $lang['addon_domains_description'],
	'L_DOMAIN' => $lang['domain'],
	'L_ACTIONS' => $lang['actions'],
	'L_DELETE' => $lang['delete'],
	'L_SETUP_REDIRECT' => $lang['setup_redirect'],
	'L_DELETE_REDIRECT' => $lang['delete_redirect'],
	'L_ADD_ADDON_DOMAIN' => $lang['add_addon_domain'],
	'L_DOMAIN_NAME' => $lang['domain_name'],
	'L_SUBDOMAIN_NAME' => $lang['subdomain_name'],
	'L_PASSWORD' => $lang['password'],
	'L_ADD_DOMAIN' => $lang['add_domain'],
	'L_ADDON_DOMAIN_HINTS' => $lang['addon_domain_hints'],
	'L_ADDON_DOMAIN_HINTS_MESSAGE' => $lang['addon_domain_hints_message'],
	
	)
);

$template->set_filenames(array(
	'body' => $root_path.$template_path.'domains/addon_domains_manage.tpl')
);

//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>